package com.lp.biz.operations.mapper;

import com.lp.biz.operations.model.entity.BizRecommend;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * BizRecommendMapper 接口
 * @program: backend
 * @author Ke.Song
 * @since 2024-07-10 21:13:20
 */
public interface BizRecommendMapper extends BaseMapper<BizRecommend> {

    /**
     * 获取最大sort
     * @param parentId 父id
     * @return 查询结果
     */
    int getMaxSort(Integer parentId);

    /**
     * 将sort + 1
     *
     * @param sort        指定sort
     * @param recommendId 忽略的recommend
     */
    void updateSort(Integer sort, Integer recommendId);
}
